<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="cn">
<head>
	
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
	
	<link rel="stylesheet" href="../../jqgrid/css/ui.jqgrid.css" />
	<link rel="stylesheet" href="../../jqgrid/css/css/redmond/jquery-ui-1.8.16.custom.css" />
	<script type="text/javascript" src="../../js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="../../jqgrid/js/jquery.jqGrid.src.js"></script>
	<script type="text/javascript" src="../../jqgrid/js/i18n/grid.locale-cn.js"></script>
	<script type="text/javascript" src="../../js/jquery-ui.js"></script>

	<!-- 本页面初始化用到的js包，创建jqGrid的代码就在里面 -->
	<script type="text/javascript" src="permissionGrid.js"></script>
	<link rel="stylesheet" type="text/css" href="../../css/css2.css" />
	<link rel="stylesheet" type="text/css" href="../../css/ui.css" />
	
	<style type="text/css">
		body {
			margin: auto;
		}
		
		#newID {
			font-size: 20px;
			color: #666666;
			font-weight: bold;
		}
		
		#bc {
			background-color: #4dcff6;
			border: none;
			color: white;
			width: 125px;
			height: 40px;
			border-radius: 5px;
			margin-left: 800px;
		}
		
		#qx {
			background-color: #ef7476;
			border: none;
			color: white;
			width: 125px;
			height: 40px;
			border-radius: 5px;
			margin-left: 800px;
		}
		
	</style>
	
	<script type="text/javascript">
		function onclick_close() {
			var shade_content = $(".shade_content");
			var shade = $(".shade");
			if (confirm("确认关闭么！此操作不可恢复")) {
				shade_content.hide();
				shade.hide();
			}
		}

		function onclick_open() {
			$(".shade_content").show();
			$(".shade").show();
			var input_out = $(".input_style");
			for (var i = 0; i <= input_out.length; i++) {
				if ($(input_out[i]).val() != "") {
					$(input_out[i]).val("");
				}
			}
		}
	
		function addPermission(){
			var url ="/editPermission?oper=add";
			var data = $("#addPermissionForm").serialize();
			$.get(url,data,function(res){
				if(res.status==1){
					alert("保存成功");
				}else{
					alert("保存失败");
				}
			},"json");
		}
	
	</script>

</head>
<body>
<div>

		<table id="permisssionList"></table>
		<div id="pager2"></div>
		<br>
	</div>
			<!--显示隐藏添加员工-->
		<div class="shade_content" style="display: none; width: 60%; background-color: white;">
			<div class="col-xs-12 shade_colse">
				<button onclick="javascript:onclick_close();">x</button>
			</div>
			<div class="nav shade_content_div" style="OVERFLOW-Y: auto; OVERFLOW-X:hidden;>
				<p id="newID">新增用户权限<span id="ts1"></span></p>
				<form id="addPermissionForm">
					<span class="sp1" style="margin-left: 50px;">
						权限ID
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="id" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 30px;">
						系统模块
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="systemCode" id="systemCode" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 50px;">
						权限编码
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="permissionCode" id="permissionCode" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 5px;">
						权限名称
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="permissionName" id="permissionName" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 5px;">
						实体(table)名字
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="entityCode" id="entityCode" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 5px;">
						实体说明
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="entityName" id="entityName" value="" class="input"/>
					<br /><br />
					
					<span class="sp1" style="margin-left: 5px;">
						操作
					</span>
					<span class="sp2">
						*
					</span>
					<input type="text" name="actionCode" id="actionCode" value="" class="input"/>
					<br /><br />
					
					
					<input type="button" value="保存" id="bc" style="margin-left: 50px " onclick="addPermission()"/>
					<input type="button" value="取消" id="qx" style="margin-left: 50px " onclick="javascript:onclick_close(); " />
					
					<br /><br />
				</form>
			</div>
		</div>	
		
</body>
</html>